package com.wyc.apidriver.controller;

import com.wyc.apidriver.service.PayService;
import com.wyc.internalCommon.request.PushPayInfoDTO;
import com.wyc.internalCommon.result.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 支付Controller
 */
@RequestMapping("/pay")
@RestController
public class PayController {

    @Autowired
    private PayService payService;

    /**
     * 发起支付，推送支付信息给乘客
     * @param pushPayInfoDTO
     * @return
     */
    @PostMapping("/push-pay-info")
    public ApiResult pushPayInfo(@RequestBody PushPayInfoDTO pushPayInfoDTO){
        return payService.pushPayInfo(pushPayInfoDTO);
    }

}
